check if a string is url or not php

79

php check if string contains url -

preg_match('/(http|ftp|mailto)/', $string, $matches);
var_dump($matches);

Comments

Submit
0 Comments